home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / comm / irc / epic4-mos.lha / share / epic / script / fake-dcc < prev    next >
Text File  |  2002-09-18  |  750b  |  33 lines

  1. /*
  2.  * Ok.  Here is the plan:
  3.  *
  4.  * We have a variable, $fake_dcc, that contains a list of words that can
  5.  * be substituted for ``DCC'' as a CTCP.
  6.  *
  7.  * The sender randomly picks a word off that list and uses it.
  8.  * The receiver then reparses the handshake if its on his list.
  9.  *
  10.  * Don't be fooled.  This script is not nearly as useful as it
  11.  * might be made to be.  Its just a contrived example.
  12.  */
  13.  
  14. @ fake_dcc = [FOO BAR GOOTCHIE]
  15.  
  16. /*
  17.  * Sender's side
  18.  */
  19. on ^send_to_server "% % % PRIVMSG % :$chr(1)DCC*" {
  20.     quote PRIVMSG $4 :$chr(1)$getrandword($fake_dcc) $6-
  21. }
  22.  
  23. /*
  24.  * Receiver's side
  25.  */
  26. on ^raw_irc "% PRIVMSG % :$chr(1)\\[$fake_dcc\\]*" {
  27.     pretend $0 $1 $2 :$chr(1)DCC $4-
  28. }
  29.  
  30. alias getrandword @ function_return = word($rand($#) $*)
  31.  
  32. #jfn'96
  33.